package com.fqgj.sentry.controller.antiFraud.response.anti.tree.gps;


import java.io.Serializable;
import java.util.*;

/**
 * Created by liupengpeng on 2017/10/17.
 */
public class RelationGpsInfo implements Serializable {
    // gps 地址， key 城市， value 经纬度
    private Map<String, Double[]> geoCoordMap;

    private List<Item> itemList;

    public Map<String, Double[]> getGeoCoordMap() {
        return geoCoordMap;
    }

    public RelationGpsInfo setGeoCoordMap(Map<String, Double[]> geoCoordMap) {
        this.geoCoordMap = geoCoordMap;
        return this;
    }

    public List<Item> getItemList() {
        return itemList;
    }

    public RelationGpsInfo setItemList(List<Item> itemList) {
        this.itemList = itemList;
        return this;
    }

    public static RelationGpsInfo getRelationGpsInfo() {
        Map<String, Double[]> geoCoordMap;

        List<Item> itemList;
        geoCoordMap = new HashMap<>();
        itemList = new ArrayList<>();
        RelationGpsInfo relationGpsInfo = new RelationGpsInfo();

        Item qqItem = new Item().setName("qq");
        List<Data> qqDataList = new ArrayList<>();
        qqDataList.add(new Data().setName("海门").setDataDesc("张三(2017-09-09) 浙江省杭州市西湖区益乐新村"));
        qqDataList.add(new Data().setName("鄂尔多斯").setDataDesc("张三(2017-09-09) 浙江省杭州市西湖区益乐新村"));
        qqDataList.add(new Data().setName("招远").setDataDesc("张三(2017-09-09) 浙江省杭州市西湖区益乐新村"));
        qqDataList.add(new Data().setName("舟山").setDataDesc("张三(2017-09-09) 浙江省杭州市西湖区益乐新村"));
        qqDataList.add(new Data().setName("齐齐哈尔").setDataDesc("张三(2017-09-09) 浙江省杭州市西湖区益乐新村"));
        qqDataList.add(new Data().setName("盐城").setDataDesc("张三(2017-09-09) 浙江省杭州市西湖区益乐新村"));
        qqDataList.add(new Data().setName("赤峰").setDataDesc("张三(2017-09-09) 浙江省杭州市西湖区益乐新村"));
        qqItem.setData(qqDataList);

        geoCoordMap.put("海门", getDoubleArray("121.15", "31.89"));
        geoCoordMap.put("鄂尔多斯", getDoubleArray("109.781327", "39.608266"));
        geoCoordMap.put("招远", getDoubleArray("120.38", "37.35"));
        geoCoordMap.put("舟山", getDoubleArray("122.207216", "29.985295"));
        geoCoordMap.put("齐齐哈尔", getDoubleArray("123.97", "47.33"));
        geoCoordMap.put("盐城", getDoubleArray("120.13", "33.38"));
        geoCoordMap.put("赤峰", getDoubleArray("118.87", "42.28"));


        Item companyItem = new Item().setName("公司名称");
        List<Data> companyDataList = new ArrayList<>();
        companyDataList.add(new Data().setName("青岛").setDataDesc("张三(2017-09-09) 浙江省杭州市西湖区益乐新村"));
        companyDataList.add(new Data().setName("金昌").setDataDesc("张三(2017-09-09) 浙江省杭州市西湖区益乐新村"));
        companyDataList.add(new Data().setName("舟山").setDataDesc("张三(2017-09-09) 浙江省杭州市西湖区益乐新村"));
        companyDataList.add(new Data().setName("齐齐哈尔").setDataDesc("张三(2017-09-09) 浙江省杭州市西湖区益乐新村"));
        companyDataList.add(new Data().setName("盐城").setDataDesc("张三(2017-09-09) 浙江省杭州市西湖区益乐新村"));
        companyDataList.add(new Data().setName("赤峰").setDataDesc("张三(2017-09-09) 浙江省杭州市西湖区益乐新村"));
        companyItem.setData(companyDataList);
        itemList.add(companyItem);


        geoCoordMap.put("青岛", getDoubleArray("120.33", "36.07"));
        geoCoordMap.put("乳山", getDoubleArray("121.52", "36.89"));
        geoCoordMap.put("金昌", getDoubleArray("102.188043", "38.520089"));
        geoCoordMap.put("舟山", getDoubleArray("122.207216", "29.985295"));
        geoCoordMap.put("齐齐哈尔", getDoubleArray("123.97", "47.33"));
        geoCoordMap.put("盐城", getDoubleArray("120.13", "33.38"));
        geoCoordMap.put("赤峰", getDoubleArray("118.87", "42.28"));
        itemList.add(qqItem);

        relationGpsInfo.setGeoCoordMap(geoCoordMap).setItemList(itemList);

        return relationGpsInfo;
    }


    private static Double[] getDoubleArray(String lat, String lng) {
        Double[] strArray = {Double.valueOf(lat), Double.valueOf(lng)};
        return strArray;
    }
}
